# -*- coding: utf-8 -*-
from abc import ABC

from app.models.dao import clear_all
from app.configs import root_path
from app.tools.init import csv2mine
from app.views import CommonHandler


class InitHandler(CommonHandler, ABC):
    async def get(self):
        clear_all()
        csv2mine(root_path + 'mine.csv')
        await self.respose(data="Mines import success!")
